package com.hyc.myvideo.ui.view;

import android.view.Gravity;
import android.view.View;

import com.hyc.myvideo.R;
import com.hyc.myvideo.ui.base.BaseDialogFragment;

import butterknife.OnClick;

/**
 * @author 弹框提示-支付选择
 * @version 1.0
 * @created 2017/8/11
 */

public class DialogPay extends BaseDialogFragment {
    private PayInterface payInterface;
    public DialogPay(PayInterface payInterface1) {
        this.payInterface = payInterface1;
    }
    @Override
    public int getContentViewId() {
        return R.layout.dialog_apy;
    }

    @Override
    public int getGravity() {
        return Gravity.BOTTOM;
    }

    @Override
    public boolean isAnimations() {
        return true;
    }

    @Override
    protected void initView() {

    }

    @OnClick({R.id.dialog_wxpay, R.id.dialog_alipay, R.id.dialog_exit})
    public void onClick(View v) {
       switch (v.getId()){
           case R.id.dialog_wxpay:
               payInterface.OnClickWxpay();
               hideDialog();
               break;
           case R.id.dialog_alipay:
               payInterface.OnClickAlipay();
               hideDialog();
               break;
           case R.id.dialog_exit:
                hideDialog();
               break;
       }
    }

    public interface PayInterface{
        void OnClickWxpay();
        void OnClickAlipay();
    }


}
